package cn.wolfcode.crm.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Setter@Getter
public class Policy {
    private Long id;
    private String sn;//编码
    private Customer customer;//客户
    private Car car;//汽车

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date applyDate;//申请日期


    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date beginDate;//开始日期
    private Employee inputUser;
    private Integer state;//暂存待提交
    private BigDecimal totalAmount ;

    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date checkDate;
    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    private Date endDate;
    private Integer duration;
    private String remark;
    private Employee auditor;
    private SafetyMechanism safetyMechanism;

    private List<Product> products = new ArrayList();//关联保险种类


}